def generate_test_report(results):
    """生成测试报告"""
    report = {
        "total": len(results),
        "passed": sum(1 for r in results if r.success),
        "failed": sum(1 for r in results if not r.success),
        "details": results
    }
    return report